started adding some basic function in preparation to solving sequence