rewrite camera usage, added camera preview class