getting next fraction or next operation