implemented max width for images
deleted test code