how to perfectly implement singleton design pattern in java