should sanitize input correctly, now for branches