cleaned code, implements has_one_through