Further reduced duplicate code