code ready for server