added statements to mainactivity (error occuring when debugging)