functions for grabbing input