now outputing values in correct format