without flags. almost ready for testing