added stride computation method