refactor code
change card detail view