added constants for min and max values, method to set ct with bounds checking