Fix syntax error from before and added a format function.