Added first version with all the previously present code