final code for thursday