improve lightbox implementation