Made the modem variable local to this API