clean code in some places