Restructured and created version 3