generate methods