First version for testing and debugging