removed overridden function from bad place and some code minor fix