code cleaned after merge