much simpler, less repeated code