separando files
controls and ugly code