fixed undefined not an object
server mmm with tests