handling discrete values