lets you select language now, minor refactoring of code