added select statement to get data