copy of https://github.com/bfhaddad/gschool