refactorying #4