types, github, with test and refactored