improved the polting script some how