Added tutorial javascript functions