finish export function
fix bugs in display