fixed error from irina's version