ashci() function improved