Putting the implementation for analysis of rectacngle