improved parsing and prefixing