cleaned code, added check for non-compatible browsers