bug fixes; strToEnum now assigns enum by ref and returns int depending on success