Base funtions.