Removed duplication code