Second part of devise implemented