this will fix #2 and fix #3 and also added padding