remake of some bash features