improve code e comments