cast also on server side