gets image from db and pin code works