Implement wait command