More complicated but faster method

Also added a comment to explain the reason for such a complicated method
1 file changed