my subroutine more than 10 times faster