added status action and some refactorings