move utilty functions over to utils.rs.