updated atomic functions