refactored few variables