changed wait to sleep on Thread