added code for megalopolis server.