Getting and sanitizing the data