added tadatuta's correction

as well as cross-browser development