second try on bezier implementation, still wrong.