added fail and success states to buttons