updated for other functions