solves 4
refactor 3