refactored the way private methods are called