clearing code

P.S. refactoring needed