added -f implementation