implementing changes from recent commits