changed compilation flags. not sure they are correct