Use compact to get rid of nil values