init server side code