removed bug from magic function