fixed the Layout and made the encript function usable