refactored some vars into constants