restructre and added new tests