added specs for AI methods
updated code to pass specs