added error messages
using key as url
added success msg