cleaned code after merge