removed unused code

bad performance in this version