It works lucky of you... but please, for the sake of the candid souls who might take your code as a reliable source of knowledge, don't call it template. I am seriously worried about them. Your code is terribly wrong. Don't you realize that you complain about AUMs free resources while you distribute a pseudo-template thousands of magnitudes worst? Seen is believing. Sincerelly, learn what an engine handle is and stop holding your responsabilities on others.