added create if not exists functionality
add update logic to differentiate from create logic