implement the blocking option