* Removed some code duplication