cast port to int