Add function to work on entire file