fix for rectangle fill best fit
added engine interface