replace slow loop with sql query
more
more
more
migrated JS translations