some re-organisation and added boost test