First version working for basic usage