code improvments