make options() function work with integer values, and make it more efficient by only retrieving field value once per call (not every loop iteration)