optional before picture, some refactoring