make uniform api for attributes and pids