Someone actually might use this code. By request, added a license