use sizeof to prevent hardcoding size in getDetails