added getMeta api command; messing with dynamic allocation of memory for sample command and getMeta