removed unused code and changed cursor