first version basically done, ready for testing