refactors for readability