Added the pre-configuration part!! Not checked!! maynot work