finally have this sorted