adding prepare functions
adding flags for every work on the gallery
appending the requested work after its flag