some code cleaining