added profiler, and happily fixes #10 cc @highend and @schlamar