trying to solve error when applying