refactor and addition of multiple format types