switched to native javascript