new tests writen and restructured