initial support for if logic and better type handling