resize-x code container
improve function readability
formatting