switch type to int