updated homework3 - better shelve