Generalized code and added example file