some logical cleaning and shit