for learning purpose, based on ronnywang --- jobhelper