change place to make it work & logic is also done