add functions

This adds functions that are used by starlink