extracted into functions
more
calculate next break point