code quality improvments