first draft of bezier code integration