adding all the code of the initial build