added namespaces
removed sleeps, using timer instead