first code attempts