ported the whole simple formatter