not sure if its worth getting rid of the minor code duplication