bugs fixed cleared code