added mio
better alignment code for heading