organise code better