finishing the initial code