fix some stuff and completed this branch