first batch of functions