changed to use the associations