added overwriting
moved code to code folder