added create if not exists functionality