getting data from the scope