curling and parsing stuff