faster version (alt_main)