updated some parsing code