updated the whole framework based off stokes mods