function moved to def pascal