completed base algorithm