pulling in merge request to change checking for size to check if it's empty