Completed version 2