Adding wait queue stuff