bugfix in function format