reduce complex of parse method