getData fucntion added