fixed error; code needs check