refactor
impl. relations