-some work on hvl_process_frame()
-copied over the rest of functions