Feature working but need of code cleaning