finalized img_prc
script for database
lots of changes