add caption to gallery elements