cleaned up code to avoid warnings