refactored some vars to vals