options are now just a typedef of unsigned int so multiple options can be passed around in one go.
updated with new overload of getp() with const char*