add architecture independence as suggested by #29