cleaned up defines and added a method for iOS version