cleaning tested and working now, minor bugs