updated skeleton code