refactor slightly to prepare for adding score