cleaned code RTM