First (almost) fully tested real function added