adding all the code