parse implementation