working on master detail thing