Fisrt working version (supports only Mass)