Final code for projects