Second functionality and main activity