extracing sample data
separating out functionality