added atomic array test and fixed bugs