made it into one line calculation