created script for retrieving data