completed version 4