changes to improve code