Added ported mine function