Applied jack's changes