make paths an object with key being the id