simple ga implementation