completed version 1