after looking into this quite a bit, this is the correct way to do it after all