reddsign some logic to gallery