dding a more flexible controller for horizontal and vertical padding