Trying to finish homework