Why don't you just use a callback in this situation?