add code to gallery page