some cleaning in th ecode