added skeleton from tinynav, pretty close to what I need.