added final touches - database controls, master detail