first beta version, single threaded