added autoconfig and other stuff