added a function for storing car action