debugged almost all..