queue implementation skeleton