Added padding function; still under construction