modification to handle null picture