now takes optional param to provide extra functionality...more to be added