adde purcase funcionality