small javascript enhacement