created following a tutorial on TheCodePlayer.com