this is starting to come allong needs to be documented but it starting to work