solved int casting problem