modified to be correct