added all code for initial commit