yay database function is working