refactor code for corba servants