some changes.. still needs serveral fixes