moved code to new homework version