converting this to a helper