made code improvement