changes
fixed merge conflicts
covered for possible race condition