fixed errors from first assignment