-slight code refactor