rtm scalar first attempt