get funtion to work