Improve code

Signed-off-by: Filipe Leuch Bonfim <flb09@inf.ufpr.br>