move compat functions before use