started writing some functions to deal with measurement protocol uploads