week4: all mandatory functions