Add synchronized for common function