rafactoring and code cosmethics