modified for wisp functions