improved performace of code