More than 50 students at Hyannis West Elementary School don’t mind staying after school for two and a half hours and doing their homework because they also get to do educational and fun projects with others in the community. The after-school program — from 3:30 to 6 p.m. every school day — is called the 21st Century Community Learning Center.

The program was restarted in October after the school received a three-year federal grant through the state’s Department of Elementary and Secondary Education. It had run previously for eight years, but lost the grant two years ago before it resumed, Chaitra McCarty, the project’s site coordinator and a third-grade teacher at the school, explained during a recent visit to see the program in action.

The program is based on service learning with a focus on a STEM (Science, Technology, Engineering, and Mathematics) curriculum, and the students in the program are learning and having fun as well.

“I like doing my homework in school,” said third-grader Miguel Teixeira, explaining that it allows him free time when he gets home. “I really like school, so I don’t mind it,” he said of the extra hours.

Miguel also likes the two projects he has signed up for — with the JFK Hyannis Museum and Twin Brooks Golf Course. In the JFK program, he said, “I’m learning about how he liked to sail and liked the water.” His group members are also building miniature sailboats. In golf, he said he is learning more things he didn’t know about the sport that he can apply in mini-golf.