added basic commit func