switched to using standard format function