Might be possible to use an inner join here