Modified getInstance and get All Instances