Added error checking!