refactor out into specialised classes