Is there a better place to put this logic?