cleanup code to remove warnings