merging nizar code