commiting design pattern