better property parsing algorithm