Creating template
Initial version
Dont use a thread