implemented settings code