hinting
refactoring functions