finished up & debugged