refactor repo init