refactored gitcheck