Separate out into more helper methods or even better a separate class