fixing changes and bugs