smooth vertically value shifting without the 'brute force write over
method'
and some code refactoring