final code for Sherlock Square