improve camera codes