Updated: Make method generic