wait added
Minor changes