added support for placeholders and optimised for it and other features not being used