added access limitation
added authentication function
added error check functionality