new data parameter calculation logic
validation
added case statement for boolean and category types