Added more subfunction definitions