Initial version of code