finished initial version