Updated homework6 calculator