moved getValues function