curve functions