added selfgravity option