added function to queue