alspgrad algorithm tested