updated to fit db