algorithm finished, homework objectives to be added