breaking out functionality in app