reworked commit checking