Finished up code