add ushort writer
refactor data types