Refactored: delted unused function