Temporarily freezing this code. Will try to improve efficiency still