remove pure
fix usage of extern