fixes folowing code optim, code smell again