modified to pass test