empty function rewritten, added wrap function