Save memory by only defining these methods once