fix the version 3 and finish the verison 4