add wait operation functionality