Use functions with in out when relevant