fixing code after reviewwing #202