implemented layers, buggy though