final commit algo 1