added support for IE9 and below + some enhancements