remove unused var, simplify timestamp func