open activity
rewrite the index function