implemented initial version