parse map from input