Modified for non-static use