layouts implementation
nearly new