finish following function's picture layout
following function partially done