Change queue to ptr