added atomic top, cur to gen_server