putting final code