finished main activity
function implemented