pseudocode for editing picture functionality