removed nbend param from step function