restructuring method
removing unused stuff