implemented generate action