fix API version check
added constant for waiting time variable