Code for challenges from CODE2040 API challenge