consolidating the get() function too