There should probably be a javascript version