added else statement so calculation would run