initial implementation of standalone version