master detail now works