fixed errors from merging with andreas