method decl and apply is nearly working