add test and finish get function