almost finished with gallery fixing