fixed bugs
Modified to input parameters to generate initial configurations.