renamed var lowercase
refactored to private functions