added thread sleep to check test problem