initial version of code