resizing. has some rounding errors. closes #3