fixed function for tail small/big