working after some changes