having some problems for both of two activities