fixed some part of code