Added the proper story lines, coded the function properly as i had troubles before hand