fixed an error and added a test