increase flexibility of id function