adding support to gpreview
ajustes e refactoring