basic frame stuff now working
added support for no-distance case