remove unnesassary and uncompatibale code