Created a precedence system to avoid intermediate types