fixing chris' code