first version with working test