minor fix to display images
adding fields and some logic to form