establishing functions