complete Gallery implementation