debugged parsing references