better format handling