Added version which does everything with scipy