initial commit; ripped from cuckoo