Removes code duplication