added errors but errors need better formatting - masa