works but need to redo formattypes api