possibly should check if it's not empty here. (can max be <0 ?)