simple implementation of profile for future improvement