improvements in code