refactor the securings (still has a bug in it)