refactored the logic concerning buying of huts - doesn't really work :-/