updated for SDK and non-SDK usage