with code from tutorial git hub