finished coding and dealt with bugs