Adding implementation for a more proper queue