added support for different binlog formats