implemented a more flexible frame formatter.