simple-apply tested
modified loli-simple-apply