finished ex 1, 2, 3 of Dynamic Queries and User Input