updated code for generic formating