removed magic count handling