copied over newest version from camayak