added stuff from tutorial