cleaned up code and deleted DEFINE