seperated code into common, client, server modules