separating out functions