added do if in queue helper method
refactored queue actions