putting master's code back in