Revert "Revert "comit function""

This reverts commit 18d245d7032c4f55867792f32ecbe6cce84397e9.