cleaning adriano's code