Modified to use imagehandler