fixed not printing bugs and removed redundant items in locations code