removed unused code. ready to merge with master