Added functionality for statistics
Fixed conflicts