some bug fixes and starting work on creating the first guess file
fixing error