more boilerplate, started on define functions