few additions, bugs etc.