added synchronized for getInstance()