Ok. It looks better. Please, rewrite this peace of code