can you extract this to a helper method