proper casting