second function work plus skeletons for everything else