added apphook and new views