implement function for getting contents