created Run() method for server