final version without clases