Refactored into bit sized tasty functions