add gallery backend functions