sort of fixed skeleton code