insreted is array fucntion in purchases