added some inline docs