initial version with a simple thread